<template>
  <el-dialog title="选择企业成员" :visible.sync="$attrs.visableIf" @close="handleCloseDialog" :close-on-click-modal="false" :close-on-press-escape="false" append-to-body width="800px">
    <div class="content-big">
      <div class="content-left">
        <div class="search-big">
          <div class="search">
            <el-input v-model="form.name" style="width: 240px;" placeholder="搜索成员的姓名、实名" clearable size="small"/>
            <el-button icon="el-icon-search" size="small"></el-button>
          </div>
        </div>
        <div class="title"><i class="el-icon-circle-plus-outline"></i>姓名</div>
        <ul class="userList">
          <li><i class="el-icon-circle-plus-outline"></i><img src="@/assets/images/profile.jpg"/><span>闵雨薇</span></li>
        </ul>
      </div>
      <div class="content-right">
        <div class="right-title">已选择成员（1）</div>
        <ul class="userRight">
          <li>
            <div class="name">
              <img src="@/assets/images/profile.jpg"/><span>闵雨薇</span>
            </div>
            <i class="el-icon-remove-outline"></i>
          </li>
        </ul>
      </div>
    </div>
    <div class="footer-btn" slot="footer">
      <el-button @click="handleCloseDialog">取消</el-button>
      <el-button type="primary" @click="submitData">确定</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      form: {
        name: null,
        userList:[
          {id:1, name:'小红',},
          {id:2, name:'小李',},
        ],
        chooseList:[],
      }
    };
  },
  methods: {
    handleCloseDialog() {
      this.$emit('update:visableIf', false);
      this.$emit('handleQuery');
    },
    submitData() {

    }
  },
};
</script>
<style lang="scss" scoped>
.content-big {
  display: flex;

  .content-left {
    margin:0 20px;
    height: 436px;
    border: 1px solid #e9e9e9;
    width: 480px;
    .search-big {
      border-bottom: 1px solid #e9e9e9;
      margin: 0px auto;
      display: flex;
      align-items: center;
      justify-content:center;
      height: 50px;
      .search {
        width: auto;
      }
    }
  }
  .content-right {
    width: 280px;
    background: #f5f5f5;
    .right-title {
      padding: 12px 20px;
      border-bottom: 1px solid #e9e9e9;
      color: rgba(0, 0, 0, .85);
    }
  }
}

.search {
  display: flex;
  width: 100%;

  ::v-deep.el-input__inner {
    border-right: none !important;
    border-radius: 4px 0px 0px 0px;
  }

  ::v-deep .el-button--default {
    border-radius: 0px 4px 4px 0px;
    padding: 0px 10px;
  }
}
.title {
  height: 40px;
  display: flex;
  align-items: center;
  background-color: #fafafa;
  padding: 0px 20px;
  font-weight: bold;
  .el-icon-circle-plus-outline {
    font-size: 16px;
    margin-right: 10px;
    cursor: pointer;
    font-weight: 400;
  }
}
.userList {
  padding:20px;
  li{
    list-style: none;
    display: flex;
    height: 40px;
    align-items: center;
    .el-icon-circle-plus-outline {
      font-size: 16px;
      margin-right: 10px;
      cursor: pointer;
    }
    img {
      width: 40px;
      height: 40px;
      border-radius: 5px;
      margin-right: 10px;
    }
    span {
      margin-left: 10px;
    }
  }
}
.userRight {
  padding:20px;
  li{
    list-style: none;
    display: flex;
    height: 60px;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px  solid #eee;
    padding: 0px 10px;
    .el-icon-circle-plus-outline {
      font-size: 16px;
      margin-right: 10px;
      cursor: pointer;
      color: #C03639;
    }
    img {
      width: 40px;
      height: 40px;
      border-radius: 5px;
      margin-right: 10px;
    }
    span {
      margin-left: 10px;
    }
    .name {
      display: flex;
      align-items: center;

    }
  }
}
</style>
